package com.ktjy.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ktjy.pojo.SysRole;
import com.ktjy.pojo.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author 15423
* @description 针对表【t_sys_user(系统用户)】的数据库操作Mapper
* @createDate 2024-04-25 14:52:37
* @Entity generator.domain.SysUser
*/
@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {
    //登录
    SysUser login(@Param("realName") String realName, @Param("password") String password);
    //查询用户列表
    List<SysUser> getUserList(@Param("realName") String queryRealName,@Param("roleId") Integer queryRoleId,@Param("pageIndex") Integer pageIndex,@Param("pageSize") int pageSize);
    //查询用户总数
    int getUserCount(@Param("realName") String queryRealName,@Param("roleId")  Integer queryRoleId);

    //新增用户
    boolean add(SysUser sysUser);

    //查询用户详情
    SysUser getUserById(Integer id);

    //查询用户是否存在
    Integer getUserExist(@Param("account") String account,@Param("roleId") Long roleId);


}
